# include <stdio.h>
int main ()
{
	int a;
	scanf("%d",&a);
	switch(a/10)
	{
		case 10:if (a%10==10)
		            printf("A");
		        else
		            printf("ERROR");
		        break;
		case 9:printf("A");break;
		case 8:printf("B");break;
		case 7:printf("C");break;
		case 6:printf("D");break;
		case 5:
		case 4:
		case 3:
		case 2:
		case 1:
		case 0:if (a >= 0)
	           printf("E");
			   else
			       printf("ERROR");
				   break;
		default :printf("ERROR");
	return 0;
	}
}
